#ifndef __DORMANT_H__
#define __DORMANT_H__
#include <app/dormant/dormant_if.h>



#if TRAPSET_CORE

/**
 *  \brief Configures the dormant mode. All the configurable settings are defined in
 *  \#dormant_config_key.
 *  \param key Which aspect of dormant to configure. 
 *  \param value Which value to use. 
 *  \return TRUE if the key is valid and the input value corresponding to the key is valid,
 *  else FALSE.
 *                        Please note that if the request to go into dormant mode
 *  is successful the trap will never return.
 * 
 * \ingroup trapset_core
 */
bool DormantConfigure(dormant_config_key key, uint32 value);

/**
 *  \brief Get the specific triggers that caused the system to exit from dormant state.
 *         There are several sources that can cause the system to wake-up, and
 *         it's possible for multiple events to occur simultaneously. As a result,
 *         the return value may include one or more of these sources from the
 *         pre-defined list (\#dormant_wake_source_info).
 *         To handle this, the application should simply check for each relevant
 *         cause that is important to it, rather than trying to identify the exact
 *         reason for the wake-up.
 *         
 *  \param wake_sources Wake source information will be written to the location pointed to by this
 *  argument.
 *  \return TRUE if the input argument is valid, else FALSE.
 * 
 * \ingroup trapset_core
 */
bool DormantGetWakeSources(dormant_wake_source_info * wake_sources);
#endif /* TRAPSET_CORE */
#endif
